package uplb.ics.cs190.e2d.graphics;

import uplb.ics.cs190.e2d.display.Graphics;

public class AWTImage implements Image {

	protected java.awt.Image image;
	
	public AWTImage(java.awt.Image image) {
		this.image = image;
	}
	
	public AWTImage() {
		this.image = null;
	}
	
	public void render(Graphics g, int x, int y) {
		g.drawImage(this, x, y);
	}
	
	public int getWidth() {
		return this.image.getWidth(null);
	}
	
	public int getHeight() {
		return this.image.getHeight(null);
	}
	
	public boolean isEmpty() {
		return this.image == null;
	}
	
	public void setImage(java.awt.Image image) {
		this.image = image;
	}
	
	public java.awt.Image getImage() {
		return this.image;
	}
}